home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 101-125 / disk_114 / cdecl / makefile.unix < prev    next >
Makefile  |  1992-05-06  |  1KB  |  45 lines

  1. # Makefile for cdecl
  2. DESTDIR=
  3. CFLAGS=    -O
  4. LIBS=
  5. MAKE=    make
  6. WHERE=    /usr/local/bin
  7.  
  8. all:    cdecl
  9.  
  10. cdecl:    cdgram.o cdsupp.o
  11.     ${CC} ${CFLAGS} -o $@ cdgram.o cdsupp.o
  12.  
  13. clean:
  14.     rm -f core *.o cdecl cdlex.c cdgram.c
  15.  
  16. install: cdecl
  17.     install -s cdecl ${DESTDIR}${WHERE}/cdecl
  18.  
  19. depend: cdgram.c cdlex.c cdsupp.c
  20.     for i in cdgram.c cdlex.c cdsupp.c; do\
  21.         cc -M ${INCPATH} $$i | sed -e 's, \./, ,' | \
  22.         awk '{ if ($$1 != prev) { if (rec != "") print rec; \
  23.         rec = $$0; prev = $$1; } \
  24.         else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
  25.         else rec = rec " " $$2 } } \
  26.         END { print rec }'; done >makedep
  27.     echo '/^# DO NOT DELETE THIS LINE/+2,$$d' >eddep
  28.     echo '$$r makedep' >> eddep
  29.     echo 'w' >>eddep
  30.     cp Makefile Makefile.bak
  31.     ed - Makefile < eddep
  32.     rm eddep makedep
  33.     echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile
  34.     echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile
  35.     echo '# see make depend above' >> Makefile
  36.  
  37. # DO NOT DELETE THIS LINE -- make depend uses it
  38.  
  39. cdgram.o: cdgram.c cdlex.c
  40. cdlex.o: cdlex.c 
  41. cdsupp.o: cdsupp.c
  42. # DEPENDENCIES MUST END AT END OF FILE
  43. # IF YOU PUT STUFF HERE IT WILL GO AWAY
  44. # see make depend above
  45.